package routers

import (
	"net/http"

	"example.com/m/controllers/admin"
	"github.com/gin-gonic/gin"
)

func AdminRoutersInit(r *gin.Engine) {
	adminRouters := r.Group("/admin")
	{
		adminRouters.GET("/", func(c *gin.Context) {
			c.String(http.StatusOK, "后台首页")
		})
		userRouters := admin.UserController{}
		adminRouters.GET("/addUser", userRouters.AddUser)

		adminRouters.GET("/getUser", userRouters.GetUser)
		adminRouters.GET("/editUser", userRouters.EditUser)
		adminRouters.GET("/delUser", userRouters.DelUser)
	}
}
